//
//  CLHTTPManager.h
//  ZhihuDaily
//
//  Created by 梁慧聪 on 16/8/3.
//  Copyright © 2021年 梁慧聪. All rights reserved.
//

#import <Foundation/Foundation.h>
@class CLBaseResponseModel;

@interface CLHTTPManager : NSObject

- (NSURLSessionDataTask *)GET:(NSString *)URLPath
                   parameters:(NSDictionary *)parameters
                   modelClass:(Class)modelClass
                      success:(void (^)(NSURLSessionDataTask *task, CLBaseResponseModel *model))success
                      failure:(void (^)(NSURLSessionDataTask *task, CLBaseResponseModel *model))failure;
- (void)getImageWithURL:(NSURL *)url completion:(void (^)(UIImage *image, NSError *error))completion;

- (NSURLSessionDataTask *)get:(NSString *)URLPath parameters:(NSDictionary *)parameters success:(void (^)(NSURLSessionDataTask *task, id res))success failure:(void (^)(NSURLSessionDataTask *task, NSError *error))failure;

@end
